isPentagonal		 :: Integer -> Bool
isPentagonal x = 
	let y = ((ceiling.sqrt) ( (2.0 / 3.0 * fromIntegral x ))) in 
		x == y * (3 * y - 1) `div` 2
		
pentagonalNumbers = take 5000 $ scanl (+) 1 [4,7..]

euler_044 = head $ [a-b| a<-pentagonalNumbers, b<-(takeWhile (<a) pentagonalNumbers), isPentagonal (a-b), isPentagonal (a+b)]
